<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
defined('BASEPATH') OR exit('No direct script access allowed');

include "TopSdk.php";
date_default_timezone_set('Asia/Shanghai'); 
    
class Alidayu{
    
    public $appkey;

    public $secretKey;
        
    public function __construct($params = array())
    {
        $this->appkey = $params['appkey'];
        $this->secretKey = $params['secretKey'];
    }
    
    
    public function sendsms() {

        $c = new TopClient;
        $c->appkey = $this->appkey;
        $c->secretKey = $this->secretKey;
        $req = new AlibabaAliqinFcSmsNumSendRequest;
        $req->setExtend("123456");
        $req->setSmsType("normal");
        $req->setSmsFreeSignName("注册验证");
        $req->setSmsParam('{"code":"12334","product":"香蕉蜜桃"}');
        $req->setRecNum("18938688660");
        $req->setSmsTemplateCode("SMS_6710199");
        $resp = $c->execute($req);
    }
}
